<?php 
namespace Admin\Controller;
use Think\Controller;

class OrderdataController extends AdminController
{
	public function index()
	{
		$ord = M('orderdata');
		$list = $ord->select();
		$this->assign('list',$list);
		$this->display('Orderdata/index');
	}

	//删除订单里的商品
	public function del()
	{
		// var_dump($_GET);
		$orda = M('orderdata');
		$result = $orda->where('id='.$_GET['id'])->delete();
		if($result){
			$this->success("删除成功!");
		}else{
			$this->error("删除失败!");
		}
	}

}